{extends file="assets::smarty-templates::Master"|ToPath}
{block name=content}
{html_script src="WhiteLabel.Accordion.js"}
{html_css file="accordion.css"}

<form>
    <label><h2>{$practicante->getEstudiante()->getNombres()} {$practicante->getEstudiante()->getApellidos()}</h2></label>
    <div class="cont">
        {foreach $bitacoras as $bitacora}
            <label class="expand">Semana  {$bitacora->getSemana()} | Mes {$bitacora->getMes()} | Fecha de Deligenciamiento {$bitacora->getFechaReporte()|json_to_date:"d/m/Y"}</label>
            <div class="collapse">
                <table class="normal tablesorter">
                    <tr>
                        <th class="header">Actividades</th>
                        <th class="header">Objetivos</th>
                        <th class="header">Porcentaje (%)</th>
                    </tr>
                    {foreach $bitacora->getActividades() as $actividad}
                        <tr>
                            <td class="header">{$actividad->getActividad()}</td>
                            <td class="header">{$actividad->getObjetivo()}</td>
                            <td class="header">{$actividad->getPorcentaje()}</td>
                        </tr>
                    {/foreach}
                </table>
            </div>
        {/foreach}
    </div>
</form>

<script type="text/javascript" >
    {literal}
        require(["jquery", "WhiteLabel.Accordion"], function(jQuery){
            jQuery(document).ready(function($){
                $(".expand").toggler();    
                $("#content").expandAll({trigger: ".expand", ref: "div.cont", localLinks: "p.top a"});
            });
        });
    {/literal}
</script>
{/block}